//导入 mongoose
const mongoose = require('mongoose');

//创建文档对象
let BookSchema = new mongoose.Schema({
    title: String,
    author: String,
    price: Number
});

//创建文档型对象
let BookModel = mongoose.model('book',BookSchema);

//暴露模型对象
module.exports = BookModel;
